#ifndef ARTIST_H_INCLUDED
#define ARTIST_H_INCLUDED

#include "GL/gl.h"
#include "GL/glu.h"
#include "SDL/SDL.h"
#include "SDL/SDL_image.h"
#include "SDL/SDL_opengl.h"
#include "SDL/SDL_mixer.h"
#include "SDL/SDL_ttf.h"
#include <string>

#include "helpers.h"

class Artist
{
    public:
        Artist(bool& quit);
        ~Artist();

        void clear();

        void flip(Direction dir = DOWN);

        void framerate_limit(bool menu = false);

        void showCursor();

        void hideCursor();

        void drawBox(SDL_Rect* rect, Uint32 color);

        SDL_Surface* rotate_surface( SDL_Surface *surface, Direction dir, SDL_Rect framesize);

        SDL_Surface* flip_surface( SDL_Surface *surface, int flags );

        SDL_Surface* getScreen();

        SDL_Surface* load_image(std::string filename, Uint8 r=0xFF, Uint8 g=0, Uint8 b=0xFF);
        SDL_Surface* load_semitransp( std::string filename);

    protected:
    	SDL_Surface *swScreen;

        GLuint screenTexture;			// This is a handle to our screen's texture object
        GLenum texture_format;
        GLint  nOfColors;

        void init_GL();
        void displayToGL(float rotation = 0.0f);
        Uint32 get_pixel32( SDL_Surface *surface, int x, int y );
        void put_pixel32( SDL_Surface *surface, int x, int y, Uint32 pixel );


};

#endif // ARTIST_H_INCLUDED
